<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// 初始化存储
			this.initStorage();
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			// 初始化应用存储
			initStorage() {
				// 检查是否已初始化
				try {
					const initialized = uni.getStorageSync('app_initialized');
					if (!initialized) {
						// 设置初始存储值
						uni.setStorageSync('incompleteData', '[]');
						uni.setStorageSync('completeData', '[]');
						uni.setStorageSync('app_initialized', 'true');
						console.log('应用存储初始化完成');
					}
				} catch (e) {
					console.error('存储初始化失败', e);
				}
			}
		}
	}
</script>

<style>
	/*每个页面公共css */
	
	/* 初始化 */
	page {
		font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
		box-sizing: border-box;
	}
	
	/* 按钮样式 */
	button {
		margin: 0;
	}
	
	button[type="primary"] {
		background-color: #007AFF;
	}
	
	button[type="primary"][disabled] {
		background-color: #77b3f7;
	}
	
	/* 输入框样式 */
	input {
		height: 70rpx;
		font-size: 28rpx;
	}
	
	/* 触摸反馈 */
	.hover-class {
		opacity: 0.8;
	}
</style>
